package com.project.mall.bean.vo;

import lombok.Data;

@Data
public class BaseRespVO<T> {
    private T data;
    private String errmsg;
    private Integer errno;

    public static BaseRespVO ok() {
        BaseRespVO baseRespVO = new BaseRespVO();
        baseRespVO.setErrmsg("成功");
        baseRespVO.setErrno(0);
        return baseRespVO;
    }

    public static BaseRespVO ok(Object data) {
        BaseRespVO baseRespVO = ok();
        baseRespVO.setData(data);
        return baseRespVO;
    }
}
